package cn.appsys.service.deve;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.appsys.dao.deve.AppInfoDao;
import cn.appsys.pojo.AppInfo;

@Service
public class AppInfoServiceImpl implements AppInfoService {
	
	@Resource
	private AppInfoDao adi;
	
	@Override
	public List<AppInfo> getAllBy(String softwareName, Integer status,
			Integer flatformId, Integer categoryLevel3, Integer categoryLevel1,
			Integer categoryLevel2, Integer index) {
		index=(index-1)*5;
		return adi.getAllBy(softwareName, status, flatformId, categoryLevel3, categoryLevel1, categoryLevel2, index);
	}

	@Override
	public int getAllCount(String softwareName, Integer status,
			Integer flatformId, Integer categoryLevel3, Integer categoryLevel1,
			Integer categoryLevel2) {
		return adi.getAllCount(softwareName, status, flatformId, categoryLevel3, categoryLevel1, categoryLevel2);
	}

	@Override
	public int getByAPKName(String apkName) {
		return adi.getByAPKName(apkName);
	}

	@Override
	public int addAppInfo(AppInfo app) {
		return adi.addAppInfo(app);
	}

	@Override
	public AppInfo getById(String id) {
		return adi.getById(id);
	}

	@Override
	public int upAppInfo(AppInfo app) {
		return adi.upAppInfo(app);
	}

	@Override
	public int delFile(String id) {
		return adi.delFile(id);
	}

	@Override
	public int upAppVersion(String id) {
		return adi.upAppVersion(id);
	}

	@Override
	public int delApp(String id) {
		return adi.delApp(id);
	}

	@Override
	public int upStart(String id, String flag) {
		return adi.upStart(id, flag);
	}

}
